You can see from the output in Listing 2 that you open the debugger, set a breakpoint in the calc_diff() function by specifying it by name, and then run the program within the debugger, supplying the same arguments as you would on the command line. 通过清单2中的输出可以看出,我们打开了调试器,通过指定名称在calcdiff()函数中设置了一个断点,然后在调试器中运行程序,提供与命令行相同的参数。
When the debugger stops at that breakpoint, type this command 当这个调试器停在一个观察点时,键入这个命令
After stopping the tracing, you can exit the GDB Debugger by typing the quit command. 停止跟踪以后,可以通过键入quit命令来退出GDB调试器。
Select Allow termination of remote VM option when you want the debugger to determine whether the Terminate command is available in a remote session. 如果想让调试器决定在远程会话中Terminate命令是否可用,可以选择AllowterminationofremoteVM选项。
To the bottom are the breakpoints for the debugger, the command output, and so on. 下面是调试用的断点、命令输出等等。
The best option to exit the debugger is always to abort the command and return to the regular REPL window. 退出调试器的最佳选项始终是中止命令并返回到正常的REPL窗口。
If you want to use a debugger feature that is hidden by your default ide settings, you can add the command back to the menu using the following procedure. 如果要使用由默认ide设置隐藏的调试器功能,可以使用以下过程将相应的命令重新添加到菜单中。
If the debugger encounters an exception, use this command to roll the debugger back to the specified frame number. 如果调试器遇到异常,使用此命令可以将调试器回滚到指定的帧号码。
The debugger can be enabled with a command line switch (-Xdebug), which will throw you straight into the debuggers command line at startup. 要启用调试器,需要在命令行中加入(-Xdebug)开关,这样一来在启动时就可以直接引导你进入调试器命令行。
The GNU symbolic debugger, GDB, is a powerful development tool, but one drawback is it works only from the command line. GNUsymbolicdebugger(GDB)是一个强大的开发工具,但是不足之处在于它只能在命令行下工作。